Add Claude Agent SDK templates and update to kernel.sh domain#63
Merged
Add Claude Agent SDK templates and update to kernel.sh domain#63
Conversation
Adds a new TypeScript template that integrates the Claude Agent SDK with Kernel's browser automation capabilities. The template: - Creates a Kernel browser and exposes Playwright execution via MCP - Allows Claude to autonomously browse the web to complete tasks - Supports both local CLI execution and Kernel app deployment - Auto-installs Claude Code on Kernel VMs during invocation - Uses allowedTools for permission-free headless operation
Ports the TypeScript Claude Agent SDK template to Python. The template: - Uses ClaudeSDKClient for browser automation with MCP tools - Creates a Kernel browser and exposes Playwright execution via MCP - Supports both local CLI execution (uv run main.py) and Kernel deployment - Auto-installs Claude Code on Kernel VMs during invocation - Uses claude-agent-sdk and kernel Python packages The template follows the same conventions as other Python templates in the repo, including pyproject.toml, uv for dependency management, and dual execution mode (local vs Kernel app).
Updates the README.md to document the new claude-agent-sdk template: - Added to the templates list in the --template flag description - Added example usage in the "Create a new app" examples section
Updates all website and documentation URLs to use the new domain: - onkernel.com -> www.kernel.sh - dashboard.onkernel.com -> dashboard.kernel.sh - docs.onkernel.com -> www.kernel.sh/docs Note: API/infrastructure URLs (api.onkernel.com, auth.onkernel.com, mcp.onkernel.com) are unchanged as they may require separate migration.
- Change raf@onkernel.com to raf@kernel.sh in .goreleaser.yaml - Remove outdated "kernel logs -f" instructions from templates since kernel invoke now streams logs automatically - Update comments referencing manual log watching
| os.environ["PATH"] = f"{homedir}/.local/bin:{current_path}" | ||
| print("Added ~/.local/bin to PATH") | ||
|
|
||
| print("Claude Code installed successfully") |
There was a problem hiding this comment.
Missing return code check for installation command
Medium Severity
The install_claude_code function runs subprocess.run without check=True and never validates result.returncode. If the Claude Code installation command fails (network error, script failure, etc.), the function ignores the failure, prints "Claude Code installed successfully", and returns normally. The agent then fails later with a confusing error when it tries to use Claude Code that wasn't actually installed. The TypeScript version correctly throws on non-zero exit codes via execAsync.
- Update go.mod module path to github.com/kernel/cli - Update all Go import paths - Update GitHub release API URL - Update npm package install commands - Update .goreleaser.yaml repository references
Include ts-claude-agent-sdk and py-claude-agent-sdk in all sections of the QA testing workflow. Updates template count from 13 to 15.
dprevoznik
approved these changes
Jan 8, 2026
Contributor
dprevoznik
left a comment
There was a problem hiding this comment.
LGTM - added one commit @rgarcia to add the new templates to the /qa command file. Once this is live, I can update the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
onkernel.comtokernel.sh(new domain)kernel logs -finstructions sincekernel invokenow streams logs automaticallyNew Templates
TypeScript (
pkg/templates/typescript/claude-agent-sdk/)@anthropic-ai/claude-agent-sdkwith@onkernel/sdkpnpm exec tsx index.ts "task") and Kernel deploymentPython (
pkg/templates/python/claude-agent-sdk/)claude-agent-sdkwithkernelPython SDKuv run main.py "task") and Kernel deploymentOther Changes
onkernel.com,www.onkernel.com,dashboard.onkernel.com,docs.onkernel.comreferences to usekernel.shraf@onkernel.comtoraf@kernel.shkernel logs <app> -fcomments from all templates since logs now stream automatically withkernel invokeTest Plan
pnpm exec tsx index.ts "Go to news.ycombinator.com and get top 3 stories"uv run main.py "Go to news.ycombinator.com and get top 3 stories"Note
Introduces Claude Agent SDK samples and aligns repo/docs with the new Kernel domain.
claude-agent-sdktemplates for both TypeScript and Python, including MCP tool to execute Playwright against Kernel browsers, local run scripts, and Kernel deploy/invoke actionsREADME.md, template READMEs, and code comments to replaceonkernel.comwithkernel.sh; removes outdatedkernel logs -fnotes sincekernel invokestreams logsts-claude-agent-sdkandpy-claude-agent-sdk; increases app count in test matrixgithub.com/onkernel/clitogithub.com/kernel/cli; adjustsgoreleaserorg/URLs and author emailpkg/create/templates.go) to include the new template, entry points, env requirements, and invoke commandsWritten by Cursor Bugbot for commit 67aed22. This will update automatically on new commits. Configure here.